<template>
        <div class="child">
                <h2>子组件2</h2>
                <h3>电脑：{{ computer }}</h3>
                <h3>书：{{ books }} 本</h3>
        </div>
</template>
<script lang="ts" setup>
import {ref} from 'vue'
let computer = ref('华硕')
let books = ref(4)

defineExpose({computer,books})
</script>
<style scoped>
.child {
        background-color: rgb(76, 209, 76);
        padding: 10px;
        box-shadow: 0 0 10px black;
        border-radius: 10px;
        margin-top: 20px;
}
</style>